<template>
	<view class="page-header">
		<view class="page-back-view" @tap="navigationBack" :style="{ 'margin-top': statusBarHeight + 'px'}">
			<image class="page-back-icon" src="../../../static/images/back-arrow.png"></image>
		</view>
		<view class="page-header-title">{{title}}</view>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: ''
			},
		},
		components: {},
		data() {
			return {
				statusBarHeight: 0
			}
		},
		watch: {},
		computed: {},
		methods: {
			navigationBack() {
				uni.navigateBack()
			}
		},
		created() {},
		mounted() {
			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
		},
	}
</script>

<style scoped>
	.page-back-view {
		position: fixed;
		margin-left: 24rpx;
		top: 30rpx;
		left: 0;
		width: 64rpx;
		height: 64rpx;
		z-index: 500;
	}

	.page-back-icon {
		/*position: fixed;*/
		/*margin-left: 20rpx;*/
		width: 64rpx;
		height: 64rpx;
	}

	.page-header-title {
		position: fixed;
		top: 60rpx;
		left: 0;
		width: 100%;
		height: 64rpx;
		line-height: 64rpx;
		font-size: 32rpx;
		color: white;
		text-align: center;
	}
</style>
